Skip to content

feat: Allow the ability to configure garbage collection on schema-job.#857

Closed
PurseChicken wants to merge 1 commit intotemporalio:mainfrom
PurseChicken:main
Closed

feat: Allow the ability to configure garbage collection on schema-job.#857
PurseChicken wants to merge 1 commit intotemporalio:mainfrom
PurseChicken:main

Conversation

@PurseChicken
Copy link
Copy Markdown

What was changed

This PR gives the user the ability to configure schema-job garbage collection. Specifically the ability to enable or disable the garbage collection altogether as well as specify the desired time before garbage collection runs against the job if enabled.

See Here for more information about kubernetes garbage collection on job resources.

Why?

Currently garbage collection (.spec.ttlSecondsAfterFinished) is hard coded in the server-job manifest. This means that the job will always delete itself after the specified value (currently 86400). In some cases users may want to either configure the number of seconds before deleting the job manifest, or they may want to disable this garbage collection altogether. This PR takes care of both of those scenarios.

Checklist

  1. Closes [Feature Request] Allow Schema Job ttlSecondsAfterFinished to be configurable #735

  2. How was this tested:
    The chart was validated using helm template --debug as well as packaging it (helm package) and using it in a deployment.

  3. Any docs updates needed?
    No

@robholland
Copy link
Copy Markdown
Contributor

After #846 you can set ttlSecondsAfterFinished: null in values to turn off gc. https://github.com/temporalio/helm-charts/pull/846/changes#diff-144f01bd3f0800a758f91c5e3e8a24f2177d14216e25918d924c5f3eb5d1a467R526

@robholland robholland closed this Apr 1, 2026
@PurseChicken
Copy link
Copy Markdown
Author

@robholland

We should not rely on ttlSecondsAfterFinished: null. The field is an optional integer; the usual and supported pattern is to leave the field out when you don’t want TTL. Sending explicit null can fail API validation (wrong type for a non-nullable int), depending on version and strictness.

@robholland
Copy link
Copy Markdown
Contributor

@PurseChicken do you have an example of this not working, like a validation tool/site that would reject this? The json schema for the field is:

      "format": "int32",
      "type": [
        "integer",
        "null"
      ]

@PurseChicken
Copy link
Copy Markdown
Author

PurseChicken commented Apr 28, 2026

@robholland Thanks!
You're right — the schema clearly allows null there (["integer", "null"]). I've validated the chart works with it, so this isn't a real concern. My mistake.
I was generalizing from stricter validators I've hit on other fields where the schema wasn't nullable, but that doesn't apply here. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Allow Schema Job ttlSecondsAfterFinished to be configurable

2 participants